package org.example;

import org.example.vo.DemoProperties;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.ComponentScan;

// SpringBoot 默认扫描主类所在的包和子包

@SpringBootApplication
@ComponentScan({"com.yc.fav","org.example"})
// 扫描mapper接口, 手工加入
@MapperScan("com.yc.fav.mapper")
// 读入配置方法2, 使用@ConfigurationProperties注解
@EnableConfigurationProperties(DemoProperties.class)
public class SpringbootApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringbootApplication.class, args);
    }

}
